/**
 * 
 */
package com.asdf.tests;

import java.util.Random;

/**
 * @author ilia
 */
public class SimpleCreditCard
{
	String number;
	String provider;
	int expMonth;
	int expYear;
	int zip;

	public SimpleCreditCard( String ccNumber, String ccProvider,
			int ccExpirationMonth, int ccExpirationYear, int ccZIP)
	{
		this.number = ccNumber;
		this.provider = ccProvider;
		this.expMonth = ccExpirationMonth;
		this.expYear = ccExpirationYear;
		this.zip = ccZIP;
	}
	
	/** valid cards have even ZIP code */
	public SimpleCreditCard(boolean isValid) {
		this( RandomString.get(), RandomString.get(), 
				new Random().nextInt(12), new Random().nextInt(3000),
				new Random().nextInt(500)*2 + (isValid?0:1));
		
	}
	
	public SimpleCreditCard() {
		this(true);
	}
}
